The Cedilla media format

Daniel Yokomizo / @dyokomizo

A factual world

fact ≔ atom | data
atom ≔ <name> <blob>
data ≔ <name> fact*
fact ∷ form

Well-formedness

lenient strict
atom Form parses the <blob> successfully
data Every required member fact is present As lenient and also no unspecified facts are allowed

Facts, concretely(a JSON encoding)

{"urn:isbn":"0-599-87118-0"}
{"urn:x-academia:thesis:dissertation":
 {"urn:x-academia:thesis:title":"Architectural Styles and the Design of Network-based Software Architectures"
 ,"urn:x-academia:thesis:author":"Roy Thomas Fielding"
 ,"urn:isbn":"0-599-87118-0"
 ,"urn:x-academia:thesis:chapter":
  [{"urn:x-academia:thesis:chapter-number":1
   ,"urn:x-academia:thesis:chapter-title":"Software Architecture"
   }
  ,{"urn:x-academia:thesis:chapter-number":2
   ,"urn:x-academia:thesis:chapter-title":"Network-based Application Architectures"
   }
  ]
 }
}

Facts, alternatively(a JSON encoding)

{"urn:x-iso:8601:date":"2015-12-31"}
{"urn:x-iso:8601:date":
 {"urn:x-iso:8601:day":31
 ,"urn:x-iso:8601:month":12
 ,"urn:x-iso:8601:year":2015
 }
}
{"urn:x-iso:8601:date":
 {"urn:x-iso:8601:day":31
 ,"urn:x-iso:8601:month":{"en-US":"December"}
 ,"urn:x-iso:8601:year":2015
 }
}

Facts, abridgedly(a JSON encoding)

{"@t":"urn:x-academia:thesis"
,"@i":"urn:isbn"
,"t:dissertation":
 {"t:title":"Architectural Styles and the Design of Network-based Software Architectures"
 ,"t:author":"Roy Thomas Fielding"
 ,"i":"0-599-87118-0"
 ,"t:chapter":
  [{"t:chapter-number":1
   ,"t:chapter-title":"Software Architecture"
   }
  ,{"t:chapter-number":2
   ,"t:chapter-title":"Network-based Application Architectures"
   }
  ]
 }
}

Facts about forms (and facts)

  • Unique names
  • Namespaces as Onthologies and APIs
  • Granularity
  • Extensibility
  • Interoperability

A perspective on facts

  • Facts are plain media...
  • but we can embed a fact in a view...
  • which is a hypermedia form.

A perspective on facts(a JSON encoding)

{"@c":"urn:x-cedilla","@v":"c:view"
,"c:fact":"0-599-87118-0","c:form":"urn:isbn"
,"v:link":
 [{"v:href":"~/thesis/{urn:isbn}"
  ,"v:text":"View Thesis Details"
  ,"v:form":"urn:x-academia:thesis:view-thesis"
  ,"v:data":
   [{"c:form":"urn:isbn"
    ,"v:text":{"v:label":"ISBN","v:title":{"en-US":"International Standard Book Number"}}
    ,"v:list":{"v:link":{"v:href":"~/theses"},"v:path":"$['urn:isbn']"}
    }
   ]
  ,"c:form":"t:dissertation"
  }
 ]
}

Links, a more in depth view

c ≔ urn:x-cedilla
v ≔ c:view

v:link  ≔ v:href v:form v:verb? v:text? v:hint* v:data* v:meta* c:form

v:text  ≔ <blob>
        | (v:label v:title? v:panel?)
v:label ≔ <blob>
v:title ≔ <blob>
v:panel ≔ <blob>
        | (v:link v:path?)

v:path  ≔ <blob>
        | (v:label v:value?)
v:value ≔ <blob>

Data, a more in depth view

c ≔ urn:x-cedilla
v ≔ c:view

v:data ≔ c:form v:text? v:hint* v:data* v:meta* v:list? v:test? v:size?

v:list ≔ fact*
       | (v:link v:path?)

v:test ≔ <blob>

v:size ≔ v:min? v:max?
v:min  ≔ <blob>
v:max  ≔ <blob>

Views, a more in depth view

c ≔ urn:x-cedilla
v ≔ c:view

v ≔ c:form v:text? v:hint* v:data* v:meta* v:abbr*

v:abbr ≔ (c:form v:text? v:hint* v:data* v:meta* v:list? v:test? v:size?)

Facts, summarily

  • Facts provide the foundation
  • Views work as "hyperfacts"
  • Well-known forms enable progressive enhancement